package com.gxa.learning.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * 流程节点表的映射实体
 *
 * @author lijianmin
 * @date 2021/12/02  14:56:21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_flowpath_node")
@ApiModel
public class FlowPathNode {

    /**
     * 流程节点编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "flowpath_node_id")
    @ApiModelProperty(name = "id", value = "id", dataType = "Long", example = "流程节点编号")
    private Long id;

    /**
     * 审批流程编号
     */
    @Column(name = "examine_approval_id")
    @ApiModelProperty(name = "approvalId", value = "approvalId", dataType = "Long", example = "审批流程编号")
    private Long approvalId;


    /**
     * 审批人(用户编号)
     */
    @Column(name = "user_id")
    @ApiModelProperty(name = "userId", value = "userId", dataType = "Long", example = "审批人(用户编号)")
    private Long userId;

    /**
     * 审批时间   审批人操作时间
     */
    @Column(name = "flowpath_node_operation_time")
    @ApiModelProperty(name = "operationTime", value = "operationTime", dataType = "Data", example = "审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date operationTime;

    /**
     * 审批意见
     */
    @Column(name = "flowpath_node_opinion")
    @ApiModelProperty(name = "opinion", value = "opinion", dataType = "String", example = "审批意见")
    private String opinion;

    /**
     * 审批状态 待审批/已审批
     */
    @Column(name = "flowpath_node_state")
    @ApiModelProperty(name = "state", value = "state", dataType = "Boolean", example = "审批状态(false 待审批/ true 已审批)")
    private Boolean state;

    /**
     * 流程节点截止时间
     */
    @Column(name = "flowpath_node_expiration_date")
    @ApiModelProperty(name = "expirationDate", value = "expirationDate", dataType = "Date", example = "流程节点截止时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date expirationDate;

    /**
     * 超时提醒 多小小时前提醒超时
     */
    @Column(name = "flowpath_node_expiration_date_remind")
    @ApiModelProperty(name = "expirationDateRemind", value = "expirationDateRemind", dataType = "Integer", example = "超时提醒(多小小时前提醒超时)")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Integer expirationDateRemind;

}
